// Analogue 1.09.5, Copyright (c) Analogue Web Design LLC, all rights reserved.
/*jslint bitwise: true, browser: true, eqeqeq: true, immed: true, newcap: true, nomen: true, onevar: true, plusplus: true, regexp: true, undef: true, white: true, indent: 4*/

var analogue = (function () {
    var build = new Date('June 03 2009 17:01:12'), versioning = [1, build.getFullYear().toString().slice(2), build.getMonth().toString()];
    return {
        bind: function (object, method) {
            if (!method) {
                method = this;
            }
            return function () {
                return method.apply(object, arguments);
            };
        },
        extend: function (object, source) {
            if (!source) {
                source = object;
                object = this;
            }
            for (var i in source) {
                if (source.hasOwnProperty(i) && !object[i]) {
                    object[i] = source[i];
                }
            }
            return object;
        },
        path: document.getElementsByTagName('script')[0].src.replace(/js$/, '').replace(new RegExp('^' + document.location.protocol + '//' + document.domain), ''),
        version: versioning.join('.') + ' (' + build.valueOf() + ')'
    };
}());

// Analogue.detect, rv: June 03 2009 17:00:23
analogue.detect = (function (window) {
    var a, div = document.createElement('div'), root = document.documentElement;
    root.className = 'hasJs';
    div.innerHTML = '<a href="/a" style="color:red;float:left;opacity:.5">a</a><input />';
    div.getElementsByTagName('input')[0].setAttribute('name', 'nameAttribute');
    a = div.getElementsByTagName('a')[0];
    if (!window.HTMLElement) {
        if (window.Element && window.Element.prototype) {
            window.HTMLElement = window.Element;
        } else {
            if (window['[[DOMElement.prototype]]']) {
                window.HTMLElement = function () {};
                window.HTMLElement.prototype = window['[[DOMElement.prototype]]'];
            }
        }
    }
    return {
        cssFloat: !!a.style.cssFloat ? 'cssFloat' : 'styleFloat',
        getElementById: (function () {
            var div = document.createElement('div'), id = 'id' + new Date().getTime(), value = true;
            div.innerHTML = '<a name="' + id + '"></a>';
            root.insertBefore(div, root.firstChild);
            value = !div.ownerDocument.getElementById(id);
            root.removeChild(div);
            return value;
        }()),
        href: a.getAttribute('href') === '/a',
        style: (/red/).test(a.getAttribute('style')),
        setAttribute: (/nameAttribute/).test(div.innerHTML),
        arraySlice: (function () {
            try {
                return !!Array.prototype.slice.call(root.childNodes)[0];
            } catch (e) {
                return false;
            }
        }()),
        opacity: a.style.opacity === '0.5',
        textContent: a.textContent === 'a' ? 'textContent' : 'innerText'
    };
}(this));

// Analogue.elements, rv: June 07 2009 22:33:38
analogue.elements = (function (window) {
    var booleans = {
        'checked': 'checked',
        'disabled': 'disabled',
        'multiple': 'multiple',
        'readonly': 'readOnly',
        'selected': 'selected'
    }, detect = analogue.detect, getOpacity = function (element) {
        if (detect.opacity) {
            return window.getComputedStyle(element, null).opacity || 1;
        }
        try {
            return element.filters.item('DXImageTransform.Microsoft.Alpha').opacity / 100;
        } catch (e) {
            try {
                return element.filters.alpha.opacity / 100;
            } catch (er) {}
        }
        return 1;
    }, i, properties = {
        'accesskey': 'accessKey',
        'class': 'className',
        'enctype': 'encType',
        'float': detect.cssFloat,
        'for': 'htmlFor',
        'html': 'innerHTML',
        'maxlength': 'maxLength',
        'tabindex': 'tabIndex',
        'text': detect.textContent
    };
    for (i in booleans) {
        if (booleans.hasOwnProperty(i)) {
            properties[i] = booleans[i];
        }
    }
    return {
        addClass: function (value) {
            var classes = this.className.split(' ');
            if (!this.hasClass(value)) {
                classes.push(value);
                this.className = classes.join(' ');
            }
            return this;
        },
        getProperty: function (attribute) {
            if (attribute === 'style' && !detect.style) {
                return this.style.cssText.toLowerCase();
            }
            if (attribute === 'opacity') {
                return getOpacity(this);
            }
            if ((/^(href|src|type)$/i).test(attribute) && !detect.href) {
                return this.getAttribute(attribute, 2);
            }
            if (booleans[attribute]) {
                return !!this[properties[attribute]];
            }
            return properties[attribute] ? this[properties[attribute]] : this.getAttribute(attribute);
        },
        hasClass: function (value) {
            return this.className && new RegExp('(^|\\s)' + value + '(\\s|$)').test(this.className);
        },
        removeClass: function (value) {
            var classes = this.className.split(' '), i, ii;
            for (i = 0, ii = classes.length; i < ii; i += 1) {
                if (classes[i] === value) {
                    classes.splice(i, 1);
                }
            }
            this.className = classes.join(' ');
            return this;
        },
        setProperty: function (attribute, value) {
            if (attribute === 'style' && !detect.style) {
                this.style.cssText = value;
            } else if (attribute === 'opacity') {
                if (detect.opacity) {
                    this.style.opacity = value;
                } else if (this.style.filter !== undefined) {
                    this.style.filter = 'alpha(opacity=' + value * 100 + ')';
                }
            } else if (attribute.match(/^on(\w+)$/i) && typeof value === 'function') {
                this.addEvent(RegExp.$1, value);
            } else if (properties[attribute]) {
                if (booleans[attribute] && typeof value !== 'boolean') {
                    value = (typeof value !== 'undefined') ? true : false;
                }
                this[properties[attribute]] = value;
            } else {
                this.setAttribute(attribute, value);
            }
            return this;
        },
        toggleClass: function (value) {
            if (this.hasClass(value)) {
                this.removeClass(value);
            } else {
                this.addClass(value);
            }
            return this;
        }
    };
}(this));

// Analogue.events, rv: June 08 2009 03:03:53
analogue.events = (function (window) {
    var guid = 0, meta = null, root = document.documentElement;
    if (root.attachEvent) {
        meta = document.createElement('meta');
        meta.pseudoEvent = null;
        meta.attachEvent('onpropertychange', function (event) {
            if (event.propertyName === 'pseudoEvent') {            
                meta.pseudoEvent.listener.call(meta.pseudoEvent.target, meta.pseudoEvent.event);
                meta.returnValue = meta.pseudoEvent.event.returnValue;
                meta.cancelBubble = meta.pseudoEvent.event.cancelBubble;
            }
        });
        document.getElementsByTagName('head')[0].appendChild(meta);
    }
    return {
        add: (function () {
            if (root.addEventListener) {
                return function (type, listener) {
                    this.addEventListener(type, listener, false);
                    return this;
                };
            }
            return function (type, listener) {
                if (!listener.guid) {
                    listener.guid = guid += 1;
                }
                if (!this.queue) {
                    this.queue = {};
                }
                var listeners = this.queue[type];
                if (!listeners) {
                    listeners = this.queue[type] = {};
                    if (this['on' + type]) {
                        listeners[0] = this['on' + type];
                    }
                }
                listeners[listener.guid] = listener;
                this['on' + type] = analogue.events.handle;
                return this;
            };
        }()),
        fix: function (event) {
            event.pageX = event.clientX + (root.scrollLeft || document.body.scrollLeft || 0);
            event.pageY = event.clientY + (root.scrollTop || document.body.scrollTop || 0);
            event.preventDefault = function () {
                this.returnValue = false;
            };
            event.relatedTarget = event.fromElement === event.srcElement ? event.toElement : event.fromElement;
            event.stopPropagation = function () {
                this.cancelBubble = true;
            };
            event.target = event.target || event.srcElement;
            event.timeStamp = new Date().getTime();
            event.which = event.charCode = event.keyCode;
            if (!event.which && event.button) {
                event.which = (event.button === 1 ? 0 : (event.button === 4 ? 1 : (event.button === 2 ? 2 : 0)));
            }
            return event;
        },
        handle: function (event) {
            event = event || analogue.events.fix(window.event);
            var i, listeners = this.queue[event.type];
            for (i in listeners) {
                if (listeners.hasOwnProperty(i)) {
                    meta.pseudoEvent = {'listener': listeners[i], 'target': this, 'event': event};
                    if (meta.returnValue === false) {
                        event.preventDefault();
                    }
                    if (meta.cancelBubble === true) {
                        event.stopPropagation();
                    }
                }
            }
        },
        remove: (function () {
            if (root.removeEventListener) {
                return function (type, listener) {
                    this.removeEventListener(type, listener, false);
                    return this;
                };
            }
            return function (type, listener) {
                if (this.queue && this.queue[type] && listener.guid) {
                    delete this.queue[type][listener.guid];
                }
                return this;
            };
        }()),
        trigger: (function () {
            if (root.dispatchEvent) {
                return function (type, which) {
                    var event = null, charCode = 0, keyCode = 0;
                    if (/mouse|click/.test(type)) {
                        event = document.createEvent('MouseEvents');
                        if (event.initMouseEvent) {
                            event.initMouseEvent(type, true, true, window, 0, 0, 0, 0, 0, false, false, false, false, which || 0, null);
                        } else {
                            event = document.createEvent('UIEvents');
                            event.initEvent(type, true, true);
                            event.button = which || 0;
                        }
                    } else if (/key(down|press|up)/.test(type)) {
                        if (which) {
                            which = typeof which === 'number' ? which : which.charCodeAt(0);
                            if (type === 'keypress') {
                                if ((which > 64 && which < 91) || (which > 96 && which < 123)) {
                                    charCode = which;
                                } else {
                                    keyCode = which;
                                }
                            } else {
                                keyCode = which;
                            }
                        }
                        try {
                            event = document.createEvent('KeyEvents');
                            event.initKeyEvent(type, true, true, window, false, false, false, false, keyCode, charCode);
                        } catch (e) {
                            try {
                                event = document.createEvent('Events');
                            } catch (er) {
                                event = document.createEvent('UIEvents');
                            } finally {
                                event.initEvent(type, true, true);
                                event.keyCode = keyCode;
                                event.charCode = charCode;
                                event.which = which || 0;
                            }
                        }
                    } else {
                        event = document.createEvent('HTMLEvents');
                        event.initEvent(type, true, true);
                    }
                    return this.dispatchEvent(event);
                };
            }
            if (root.fireEvent) {
                return function (type, which) {
                    var event = document.createEventObject();
                    if (/mouse|click/.test(type)) {
                        event.button = (which === 0 ? 1 : (which === 1 ? 4 : (which === 2 ? 2 : 0)));
                    } else if (/key(down|press|up)/.test(type)) {
                        event.keyCode = which ? (typeof which === 'number' ? which : which.charCodeAt(0)) : 0;
                    }
                    event.target = this;
                    event.type = type;
                    return this.fireEvent('on' + type, analogue.events.fix(event));
                };
            }
        }())
    };
}(this));

// Analogue.methods, rv: May 28 2009 04:34:57
analogue.methods = {
    addEvent: analogue.events.add,
    delegateEvent: function (type, listener, tag) {
        return this.addEvent(type, function (event) {
            var target = event.target;
            while (target.nodeType !== 1) {
                target = target.parentNode;
            }
            if (!tag || target.nodeName.toLowerCase() === tag) {
                listener.apply(target, arguments);
            }
        });
    },
    getElementsByAttribute: function (name, value, tag) {
        return analogue.selectors.match(this, (tag ? tag : '') + '[' + name + (value ? '~="' + value + '"' : '') + ']');
    },
    getElementsByClassName: function (value, tag) {
        return analogue.selectors.match(this, (tag ? tag : '') + '.' + value.replace(' ', '.'));
    },
    getElementsBySelector: function (selector) {
        return analogue.selectors.match(this, selector);
    },
    removeEvent: analogue.events.remove,
    triggerEvent: analogue.events.trigger
};

// Analogue.selectors, rv: June 07 2009 22:42:27
analogue.selectors = (function () {
    var trim = function (string) {
        return string.replace(/^\s+|\s+$/g, '');
    }, detect = analogue.detect, getById = function (id) {
        var element, elements = document.all[id], i;
        for (i = 1; (element = elements[i]); i += 1) {
            if (element.id === id) {
                return element;
            }
        }
        return null;
    }, getElements = function (context, tag, combinator) {
        tag = (tag ? tag : '*').toLowerCase();
        var child, children, collection = [], element, elements, i, ii, j;
        for (i = 0, ii = context.length; i < ii; i += 1) {
            switch (combinator) {
            case '>':
                children = context[i].childNodes;
                for (j = 0; (child = children[j]); j += 1) {
                    if (child.nodeType === 1 && child.nodeName !== '!') {
                        if (tag === '*' || child.nodeName.toLowerCase() === tag) {
                            collection.push(child);
                        }
                    }
                }
                break;
            case '+':
                element = context[i].nextSibling;
                while (element) {
                    if (element.nodeType === 1 && element.nodeName !== '!') {
                        if (tag !== '*' && element.nodeName.toLowerCase() !== tag) {
                            break;
                        }
                        collection.push(element);
                        break;
                    } else {
                        element = element.nextSibling;
                    }
                }
                break;
            default:
                elements = context[i].getElementsByTagName(tag);
                for (j = 0; (element = elements[j]); j += 1) {
                    collection.push(element);
                }
            }
        }
        return collection;
    }, getPrevious = function (element) {
        while ((element = element.previousSibling) && element.nodeType !== 1) {}
        return element;
    }, guid = 0, parse = function (context, selector) {
        context = [context];
        selector = trim(selector.replace(/\s*(>|\+)\s*/g, ' $1'));
        var combinator, element, elements, i, ii, j, k, kk, match, parts, property, token, tokens = selector.split(' ');
        for (i = 0, ii = tokens.length; i < ii; i += 1) {
            token = trim(tokens[i]);
            if ((match = (/^(>|\+)/i).exec(token))) {
                combinator = match[1];
                token = token.replace(combinator, '');
            }
            if (token.indexOf('#') > -1) {
                parts = token.split('#');
                element = document.getElementById(parts[1]);
                if (element && !detect.getElementById && element.id !== parts[1]) {
                    element = getById(parts[1]);
                }
                if (!element || (parts[0] && element.nodeName.toLowerCase() !== parts[0])) {
                    return [];
                }
                context = [element];
            } else if (token.indexOf('.') > -1) {
                parts = token.split('.');
                elements = getElements(context, parts[0], combinator);
                context = [];
                for (j = 0; (element = elements[j]); j += 1) {
                    match = true;
                    for (k = 1, kk = parts.length; k < kk; k += 1) {
                        if (!element.className || !element.className.match(new RegExp('(^|\\s)' + parts[k] + '(\\s|$)'))) {
                            match = false;
                            break;
                        }
                    }
                    if (match) {
                        context.push(element);
                    }
                }
            } else if ((match = (/^(\w*):first\-child$/i).exec(token))) {
                elements = getElements(context, match[1], combinator);
                context = [];
                for (j = 0; (element = elements[j]); j += 1) {
                    if (!getPrevious(element)) {
                        context.push(element);
                    }
                }
            } else if ((match = (/^(\w*)\[(\w+)([=~\|\^\$\*]?)=?"?([^\]"]*)"?\]$/i).exec(token))) {
                elements = getElements(context, match[1], combinator);
                context = [];
                for (j = 0; (element = elements[j]); j += 1) {
                    if (!(property = element.getProperty(match[2]))) {
                        continue;
                    } else if (match[3] === '=' && property !== match[4]) {
                        continue;
                    } else if (match[3] === '~' && !property.match(new RegExp('(^|\\s)' + match[4] + '(\\s|$)'))) {
                        continue;
                    } else if (match[3] === '^' && property.indexOf(match[4]) !== 0) {
                        continue;
                    } else if (match[3] === '$' && property.lastIndexOf(match[4]) !== (property.length - match[4].length)) {
                        continue;
                    } else if (match[3] === '*' && !(property.indexOf(match[4]) + 1)) {
                        continue;
                    } else if (match[3] === '|' && !property.match(new RegExp('^' + match[4] + '-'))) {
                        continue;
                    }
                    context.push(element);
                }
            } else {
                context = getElements(context, token, combinator);
            }
        }
        return context;
    }, resolve = function (rule) {
        var index = 1, last = null, match, parts = ['//', '*'];
        while (rule.length && rule !== last) {
            last = rule;
            rule = trim(rule);
            if (!rule.length) {
                break;
            }
            if ((match = (/^([#.]?)([a-z0-9\\*_\-]*)((\|)([a-z0-9\\*_\-]*))?/i).exec(rule))) {
                if (!match[1]) {
                    if (match[5]) {
                        parts[index] = match[5];
                    } else if (match[2] !== '') {
                        parts[index] = match[2];
                    }
                } else if (match[1] === '#') {
                    parts.push('[@id="' + match[2] + '"]');
                } else if (match[1] === '.') {
                    parts.push('[contains(concat(" ", @class, " "), " ' + match[2] + ' ")]');
                }
                rule = rule.slice(match[0].length);
            }
            if ((match = (/^\[(\w+)([=~\|\^\$\*]?)=?"?([^\]"]*)"?\s*\]/i).exec(rule))) {
                switch (match[2]) {
                case '~':
                    parts.push('[contains(concat(" ", @' + match[1] + ', " "), " ' + match[3] + ' ")]');
                    break;
                case '^':
                    parts.push('[starts-with(@' + match[1] + ', "' + match[3] + '")]');
                    break;
                case '$':
                    parts.push('[substring(@' + match[1] + ', (string-length(@' + match[1] + ') - ' + (match[3].length - 1) + '), ' + match[3].length + ') = "' + match[3] + '"]');
                    break;
                case '*':
                    parts.push('[contains(@' + match[1] + ', "' + match[3] + '")]');
                    break;
                case '|':
                    parts.push('[starts-with(@' + match[1] + ', "' + match[3] + '-")]');
                    break;
                case '=':
                    parts.push('[@' + match[1] + '="' + match[3] + '"]');
                    break;
                default:
                    parts.push('[@' + match[1] + ']');
                }
                rule = rule.slice(match[0].length);
            }
            if ((match = (/^:first\-child/i).exec(rule))) {
                parts.push('[not(preceding-sibling::*)]');
                rule = rule.slice(match[0].length);
            }
            while ((match = (/^:([a-z_\-])+/i).exec(rule))) {
                rule = rule.slice(match[0].length);
            }
            if ((match = (/^(\s*[>+\s])?/i).exec(rule)) && match[0].length) {
                if (match[0].indexOf('>') !== -1) {
                    parts.push('/child::');
                } else if (match[0].indexOf('+') !== -1) {
                    parts.push('/following-sibling::*[1]/self::');
                } else {
                    parts.push('//');
                }
                index = parts.length;
                parts.push('*');
                rule = rule.slice(match[0].length);
            }
            if ((match = (/^\s*,/i).exec(rule))) {
                parts.push(' | ', '//', '*');
                index = parts.length - 1;
                rule = rule.slice(match[0].length);
            }
        }
        return parts.join('');
    }, unique = function (collection) {
        var element, filtered = [], i;
        for (i = 0; (element = collection[i]); i += 1) {
            if (!element.included && element.nodeName !== '!') {
                element.included = true;
                filtered.push(element);
            }
        }
        for (i = 0; (element = filtered[i]); i += 1) {
            element.included = null;
        }
        return filtered;
    };
    return {
        match: (function () {
            if (document.querySelector) {
                return function (context, selector) {
                    var collection = [], elements = context.querySelectorAll(selector), i = 0;
                    if (detect.arraySlice) {
                        return Array.prototype.slice.call(elements);
                    }
                    while (elements[i]) {
                        collection.push(elements[i]);
                        i += 1;
                    }
                    return collection;
                };
            }
            if (document.evaluate) {
                return function (context, selector) {
                    if (context !== document) {
                        if (context.id === '') {
                            context.setProperty('id', context.tagName.toLowerCase() + (guid += 1));
                        }
                        selector = '#' + context.id + ' ' + selector;
                    }
                    var collection = [], element, elements = document.evaluate(resolve(selector), document, null, 0, null);
                    while ((element = elements.iterateNext())) {
                        collection.push(element);
                    }
                    return collection;
                };
            }
            return function (context, selector) {
                var collection = [], i, ii, groups = selector.split(',');
                for (i = 0, ii = groups.length; i < ii; i += 1) {
                    collection = collection.concat(parse(context, groups[i]));
                }
                return unique(collection);
            };
        }())
    };
}());

// Analogue.extensions, rv: June 07 2009 22:29:20
(function (window) {
    analogue.extend(Function.prototype, {
        bind: analogue.bind,
        extend: analogue.extend,
        inherit: function (object) {
            this.prototype = object;
            return this;
        },
        inherits: function (Parent, inheritance) {
            this.constructor = Parent;
            this.prototype = new Parent();
            if (inheritance) {
                this.extend(this.prototype, inheritance);
            }
            return this;
        }
    });
    analogue.extend(window, {
        addEvent: function () {
            return analogue.events.add.apply(window, arguments);
        },
        removeEvent: function () {
            return analogue.events.remove.apply(window, arguments);
        },
        triggerEvent: function () {
            return analogue.events.trigger.apply(window, arguments);
        }
    });
    analogue.extend(document, {
        addEvent: function (type, listener) {
            if ((/^(dom|ready)+(contentloaded)*$/i).test(type)) {
                if (!this.ready.fired) {
                    analogue.events.add.call(this, 'dataavailable', listener);
                } else {
                    listener.apply(this, arguments);
                }
                return this;
            } else {
                return analogue.events.add.call(this, type, listener);
            }
        },
        get: function (query) {
            var attempt = 'getElementById,getElementsByTagName,getElementsByClassName,getElementsBySelector'.split(','), i, ii, result;
            for (i = 0, ii = attempt.length; i < ii; i += 1) {
                try {
                    result = this[attempt[i]](query);
                    if (result !== null && (result.length === undefined || result.length !== 0)) {
                        return result;
                    }
                } catch (e) {}
            }
            return null;
        },
        head: document.getElementsByTagName('head')[0],
        loadScript: function (source) {
            if (/*@cc_on!@*/false && !this.ready.fired) {
                this.write(decodeURI('%3Cscript src="' + source + '" type="text/javascript"%3E%3C/script%3E'));
            } else {
                var script = this.createElement('script');
                script.setAttribute('type', 'text/javascript');
                script.setAttribute('src', source);
                this.head.appendChild(script);
            }
            return this;
        },
        loadStyleSheet: function (source, media) {
            var sheet = this.createElement('link');
            sheet.setAttribute('href', source);
            sheet.setAttribute('media', media || 'screen');
            sheet.setAttribute('rel', 'stylesheet');
            sheet.setAttribute('type', 'text/css');
            this.head.appendChild(sheet);
            return this;
        },
        ready: function () {
            if (!document.ready.fired) {
                document.ready.fired = true;
                document.ready.fire();
                if (document.removeEventListener) {
                    document.removeEventListener('DOMContentLoaded', document.ready, false);
                }
                window.removeEvent('load', document.ready);
            }
        }.extend({
            fire: (function (root) {
                if (root.dispatchEvent) {
                    return function () {
                        var event = document.createEvent('HTMLEvents');
                        event.initEvent('dataavailable', true, true);
                        document.dispatchEvent(event);
                    };
                } else if (root.fireEvent) {
                    return function () {
                        var event = document.createEventObject();
                        event.type = 'dataavailable';
                        document.fireEvent('on' + event.type, event);
                    };
                }
            }(document.documentElement)),
            fired: false
        }),
        set: function (tag, attributes, content) {
            var element, i, ii;
            if (attributes && !analogue.detect.setAttribute) {
                for (i in attributes) {
                    if (i.match(/^(checked|multiple|name|readonly|type)$/i)) {
                        tag += ' ' + i + '="' + attributes[i] + '"';
                        delete attributes[i];
                    }
                }
                tag = '<' + tag + '>';
            }
            element = this.createElement(tag);
            if (attributes) {
                for (i in attributes) {
                    if (attributes.hasOwnProperty(i)) {
                        element.setProperty(i, attributes[i]);
                    }
                }
            }
            if (content) {
                if (typeof content === 'string') {
                    element.appendChild(this.createTextNode(content));
                } else {
                    for (i = 0, ii = content.length; i < ii; i += 1) {
                        if (typeof content[i] === 'string') {
                            content[i] = this.createTextNode(content[i]);
                        }
                        element.appendChild(content[i]);
                    }
                }
            }
            return element;
        }
    });
    analogue.extend(document, analogue.methods);
    analogue.extend(analogue.elements, analogue.methods);
    if (!window.HTMLElement) {
        document.create = document.createElement;
        document.createElement = function (tag) {
            return analogue.extend(document.create(tag), analogue.elements);
        };
        document.addEvent('ready', function () {
            var element, elements = document.getElementsByTagName('*'), i;
            for (i = 0; (element = elements[i]); i += 1) {
                analogue.extend(elements[i], analogue.elements);
            }
        });
    } else {
        analogue.extend(window.HTMLElement.prototype, analogue.elements);
    }
    if (document.addEventListener) {
        document.addEventListener('DOMContentLoaded', document.ready, false);
        if (document.readyState) {
            (function () {
                if ((/loaded|complete/).test(document.readyState)) {
                    return document.ready();
                }
                setTimeout(arguments.callee, 10);
            }());
        }
    }
    /*@cc_on document.write(decodeURI('%3Cscript defer src="//:" onreadystatechange="if(this.readyState===\'complete\'){document.ready();}"%3E%3C/script%3E')); @*/
    window.addEvent('load', document.ready);
}(this));